﻿Imports VN.INS.DL.DH
Imports VN.INS.BL.BE

Public Class menu
    'class que obtiene las opciones y crea el menu dinamicamente
    Public Function opcionmenu(ByVal pusuario As String) As DataTable
        Dim objData As AdministradorOracle = New AdministradorOracle
        Dim objDt As DataTable
        Dim lxc_SQL As String
        Try
            lxc_SQL = " SELECT M.ID_MENU,M.PADRE_ID,M.POSICION,M.DESCRIPCION,M.PERFIL,M.URL FROM MENU M INNER JOIN " + _
                      " MENU_PERFIL MP ON MP.ID_MENU = M.ID_MENU INNER JOIN PERFIL P ON MP.PERFIL= P.PERFIL  " + _
                     " WHERE  MP.PERFIL = '" + pusuario + "' AND MP.ESTADO = 'A' ORDER BY  M.PADRE_ID, M.POSICION "
            objDt = objData.ExecuteSQL(lxc_SQL, "Conexion.Oracle")
            Return objDt
        
        Catch ex As Exception
            Throw ex
        End Try
    End Function

End Class
